with open('data.txt') as data:
    number_1=0
    number=0
    number_2=0
    for line in data:
        number=number+1
        line_=list(line.split())
        number_1=number_1+float(line_[0])
        number_2=number_2+float(line_[1])
    print('The averages are',f'{number_1/number:.2f}','and',f'{number_2/number:.2f}')
